const app = getApp()

Page({
  data: {
    arr: [],
    triggered: false,
    sider:[],
        data:[],
        data1:[
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
          {'id':1,'image':'/static/images/video_play.png','title':'小敏原生态水果福利群','label':'美食','read':1257},
        ],
        page:0
  },
  onReady: function () {
    const arr = []
    for (let i = 0; i < 100; i++) arr.push(i)
    this.setData({
      arr
    })
    this.getList()
    setTimeout(() => {
      this.setData({
        triggered: true,
      })
    }, 1000)

   
    
  },

  onPulling(e) {
    console.log('onPulling:', e)
  },

  onRefresh() {
    
    if (this._freshing) return
    this._freshing = true
    setTimeout(() => {
      this.setData({
        triggered: false,
      })
      this._freshing = false
    }, 3000)
  },

  onRestore(e) {
    console.log('onRestore:', e)
  },

  onAbort(e) {
    console.log('onAbort', e)
  },
    getList:function(){
      //this.data=this.data1
      this.setData({data:this.data.data1}) 
      console.log(1)     
  },
  release:function(){
    wx.navigateTo({
      url: '/pages/release/release'　
    })
  }
})
